<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	
		<div id='app'>
			<button v-on:click="sayHi">村里最好的剑点击就送!</button>
		</div>
		
		<script src='https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js'></script>
		<script>
			var vm = new Vue({
				el: "#app",
				data:{
					message: "菜！"
				},
				methods: {<!--方法必须定义在vue的methods目录中，v-on: 事件
				sayHi: function (event) {
					alert(this.message);
				}
				}
			})
		</script>
		
	</body>
</html>
